import java.util.Scanner;

public class Test {
    public static void main() {
        Scanner sc = new Scanner(System.in);
        int input = sc.nextInt();
        int count = 0;
        while (count <= 100) {
            if (input != 321) {
                System.out.println("密码输入错误，请重新输入：");
                count++;
            } else {
                System.out.println("登陆成功");
            }
        }
    }


/*import java.util.Scanner;

/*public class Test {
    public static void main (int num) {
        String binary = Integer.toBinaryString(num);
        System.out.println("原数的二进制表示：" + binary);
        System.out.print("偶数位二进制序列：");
        for (int i = binary.length() - 2; i >= 0; i -= 2) {
            System.out.print(binary.charAt(i));
        }
        System.out.println();
        System.out.print("奇数位二进制序列：");
        for (int i = binary.length() - 1; i >= 0; i -= 2) {
            System.out.print(binary.charAt(i));
        }
        System.out.println();
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String password = "123456"; // 正确的密码
        int count = 0; // 输入密码的次数
        while (count < 3) {
            System.out.print("请输入密码：");
            String input = scanner.nextLine();
            if (input.equals(password)) {
                System.out.println("登录成功！");
                break;
            } else {
                count++;
                if (count < 3) {
                    System.out.println("密码错误，请重新输入！");
                } else {
                    System.out.println("密码错误，退出程序！");
                }
            }
        }
    }
}

